<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script type="text/javascript">
		var sco=0;
		var j=0;
		for(i=1;i<=8;i++){
			sco=Number(prompt('请输入第'+i+'个同学的成绩：'));
			if (sco<80) {
				continue;
			}
			j++;
		}
		var pro=j/8;
		console.log('有'+j+'个同学分数大于等于80分，比例为'+pro);
	</script>
</head>
<body>
	
</body>
</html>